<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Banner extends Model
{
    protected $fillable = ['title', 'img', 'url'];
    protected $appends = ['img_url'];
    
    public function getImgUrlAttribute()
    {
        return config('app.url').'/storage/uploads/images/banner/' . $this->attributes['img'];
    }
}
